<!--
 * @Date: 2025-02-25 14:29:31
 * @Author: LiSong
 * @LastEditors: LiSong
 * @LastEditTime: 2025-02-25 16:07:11
 * @Description: 基础表格
-->
<template>
  <LayoutFull :="layoutAttrs">
    <template #header_left>
    </template>
    <template #header_right>
      <el-button type="primary">录入</el-button>
    </template>
    <template #main>1</template>
    <template #main_down>
      <rk-grid
        ref="downTableRef"
        :="downTableAttrs"
        :columns="downTableColumns"
      >
      </rk-grid>
    </template>
  </LayoutFull>
</template>

<script setup>
import { reactive } from 'vue';

// 布局属性
const layoutAttrs = reactive({
  enableAside: false,
  enableHeader: true,
  openUpDownMain: true,
})

const downTableRef = ref()
// 下表格属性
const downTableAttrs = reactive({
  method: 'get',
  params: {
    otherId: '12',
    expertId: '3085F440B7E845318CAA646333CCCF8F',
  },
  dataUrl: '/expert/assignRuleList/{expertId}',
  restful: true,
  seqConfig: false,
  pagerConfig: false,
  toolbarConfig: { refresh: false },
})
const downTableColumns = reactive([
  { field: 'entryLev1', title: '一级条目', width: 250, align: 'left' },
  { field: 'entryLev2', title: '二级条目', width: 320, align: 'left', },
  { field: 'reviewDesc', title: '评审内容', align: 'left', },
  { field: 'reviewStandard', title: '评审标准', width: 100, align: 'center', },
  { 
    field: 'scoreType', title: '评分选项', width: 100, align: 'center',
    formatter: ({ cellValue }) => { return cellValue == 1 ? '分数' : '是/否' }
  },
  {
    field: 'scoreRange', title: '分值', width: 100, align: 'center',
    formatter: ({ cellValue, row }) => { return row.scoreType == 1 ? cellValue : '-' }
  },
  { field: 'remark', title: '备注', width: 100, align: 'left' },
])

</script>

<style lang="scss" scoped>

</style>